package testClasses.model;

import galaxies.enums.EGalaxyAge;

import java.util.ArrayList;

import stars.StarModelBuilder;
import stars.StarModel;
import stars.StarGenerator;
import stars.enums.EStarType;


public class TestStarFactory {
	
	
	
	public static void main(String[] args) {
		
		
		StarModelBuilder fact = new StarModelBuilder();
		StarModel star = fact.createMStar(3000, EStarType.MS_RED);		
		
		
		System.out.println("Type = " + star.getType());
		System.out.println("Mass = " + star.getMass());
		System.out.println("Temp = " + star.getTemperature());
		System.out.println("Color = " + star.getColor());
		System.out.println("Luminosity = " + star.getLuminosity());
		System.out.println("Radius = " + star.getRadius());
		System.out.println("Gravity = " + star.getGravity());
		System.out.println("Age = " + star.getAge());
		System.out.println("Lifetime = " + star.getLifetime());
		System.out.println("Rotation = " + star.getRotation());
		System.out.println("MagField = " + star.getMagField());
		System.out.println("Stability = " + star.getStability());		
		
		
		/*ArrayList<Star> stars = new ArrayList<Star>();
		StarGenerator gen = new StarGenerator();
		int numStars = 1;		
		
		stars = gen.genStars(numStars, GalaxyAge.OLD);
		
		int blackhole = 0;
		int neutron = 0;
		int wDwarf = 0;
		int blue = 0;
		int bluewhite = 0;
		int white = 0;
		int yWhite = 0;
		int yellow = 0;
		int orange = 0;
		int red = 0;
		int giant = 0;
		int sGiant = 0;
		int hGiant = 0;
		int unknown = 0;
		
		for (Star star: stars)
		{			
			if (star.getType().equals(StarType.BLACKHOLE))
				blackhole += 1;
			else if (star.getType().equals(StarType.DWARF_WHITE))
				wDwarf += 1;
			else if (star.getType().equals(StarType.GIANT))
				giant += 1;
			else if (star.getType().equals(StarType.SUPERGIANT))
				sGiant += 1;
			else if (star.getType().equals(StarType.HYPERGIANT))
				hGiant += 1;
			else if (star.getType().equals(StarType.NEUTRON))
				neutron += 1;
			else if (star.getType().equals(StarType.MS_BLUE))
				blue += 1;
			else if (star.getType().equals(StarType.MS_BLUEWHITE))
				bluewhite += 1;
			else if (star.getType().equals(StarType.MS_WHITE))
				white += 1;
			else if (star.getType().equals(StarType.MS_YELLOWWHITE))
				yWhite += 1;
			else if (star.getType().equals(StarType.MS_YELLOW))
				yellow += 1;
			else if (star.getType().equals(StarType.MS_ORANGE))
				orange += 1;
			else if (star.getType().equals(StarType.MS_RED))
				red += 1;
			else
				unknown += 1;

			System.out.println("Type = " + star.getType());
			System.out.println("Mass = " + star.getMass());
			System.out.println("Temp = " + star.getTemperature());
			System.out.println("Color = " + star.getColor());
			System.out.println("Luminosity = " + star.getLuminosity());
			System.out.println("Radius = " + star.getRadius());
			System.out.println("Gravity = " + star.getGravity());
			System.out.println("Age = " + star.getAge());
			System.out.println("Lifetime = " + star.getLifetime());
			System.out.println("Rotation = " + star.getRotation());
			System.out.println("MagField = " + star.getMagField());
			System.out.println("Stability = " + star.getStability());
		}
		
		System.out.println("BLACKHOLES: " + blackhole + " " + ((double) blackhole/numStars));
		System.out.println("WHITE DWARFS: " + wDwarf + " " + (double) wDwarf/numStars);
		System.out.println("GIANTS: " + giant + " " + (double) giant/numStars);
		System.out.println("SUPERGIANTS: " + sGiant + " " + (double) sGiant/numStars);
		System.out.println("HYPERGIANTS: " + hGiant + " " + (double) hGiant/numStars);
		System.out.println("NEUTRON: " + neutron + " " + (double) neutron/numStars);
		System.out.println("BLUE: " + blue + " " + (double) blue/numStars);
		System.out.println("BLUEWHITE: " + bluewhite + " " + (double) bluewhite/numStars);
		System.out.println("WHITE: " + white + " " + (double) white/numStars);
		System.out.println("YELLOWWHITE: " + yWhite + " " + (double) yWhite/numStars);
		System.out.println("YELLOW: " + yellow + " " + (double) yellow/numStars);
		System.out.println("ORANGE: " + orange + " " + (double) orange/numStars);
		System.out.println("RED: " + red + " " + (double) red/numStars);
		System.out.println("UNKNOWN: " + unknown + " " + (double) unknown/numStars);*/
		
		
	}

}
